package com.ziyun.erp.modules.goodsCategory.dao;

import com.ziyun.erp.modules.goods.entity.GoodsAttributeEntity;
import com.ziyun.erp.modules.goodsCategory.entity.GoodsCategoryEntity;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 商品分类表
 * 
 * @author 
 * @email 
 * @date 2018-08-17 13:22:48
 */
@Service("goodsCategoryDao")
public interface GoodsCategoryDao extends BaseMapper<GoodsCategoryEntity> {

    List<GoodsCategoryEntity> getCatNamesByCategoryId(@Param("categoryId") Integer categoryId);

    GoodsCategoryEntity getCatByTemplateId(@Param("templateId") Long templateId);

    void updateTemplateId(@Param("templateId") Long templateId,@Param("categoryId") Integer  categoryId);

    void flagDel(@Param("categoryId")Integer categoryId);

    List<Map<String,Object>> getAttributeValueKeyByOptionIds(@Param("ids") String ids);

    List<Integer> getCategoryIdsByParentIds(@Param("parentCategoryIds") String parentCategoryIds);

    void hide(@Param("categoryId") Integer categoryId,@Param("hide") Boolean hide);
}
